package com.ysxm.entity;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;
import javax.validation.groups.Default;

public class Admin {
	public interface alogin extends Default{}
	public interface admin extends Default{}

	private Integer aid;
	@Size(groups= {alogin.class},min=1,max = 6, message = "名字少于1且不能大于6位")
	private String aname;
	@Size(groups= {alogin.class},min = 6, max = 16, message = "密码不能小于6位且不能大于16位")
	private String apassword;
	@NotEmpty(groups= {admin.class},message="请输入电话")
	private String aphone;
	@Email(groups= {admin.class},message="请输入正确的邮箱格式(xxx@qq.com)")
	private String email;
	public Admin() {
	}

	public Admin(String aname, String apassword, String aphone,String email) {

		this.aname = aname;
		this.apassword = apassword;
		this.aphone = aphone;
		this.email = email;

	}

	public Integer getAid() {
		return aid;
	}

	public void setAid(Integer aid) {
		this.aid = aid;
	}

	public String getAname() {
		return aname;
	}

	public void setAname(String aname) {
		this.aname = aname;
	}

	public String getApassword() {
		return apassword;
	}

	public void setApassword(String apassword) {
		this.apassword = apassword;
	}

	public String getAphone() {
		return aphone;
	}

	public void setAphone(String aphone) {
		this.aphone = aphone;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Override
	public String toString() {
		return "Admin [aid=" + aid + ", aname=" + aname + ", apassword=" + apassword + ", aphone=" + aphone + ", email="
				+ email + "]";
	}

	

}
